home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / comm / tlx_sq15.zip / EXIT.SLT < prev    next >
Text File  |  1990-11-14  |  1KB  |  46 lines

  1. //-----------------------------------------------------------
  2. // EXIT.SL? Toggle Auto Exit setting.
  3. //
  4. // This script is executed if you press Alt-X while being online.
  5.  
  6.  
  7. // Please look at the comments through the whole file, and modify to
  8. // suit your needs, BEFORE you use it. Then recompile with CS LOGOFF.
  9.  
  10. // If you have suggestions for improving this script, please suggest
  11. // improvements to me via old-fashioned snail-mail to:
  12.  
  13. //   Inge Vabekk
  14. //   Hamangskogen 108
  15. //   N-1300 SANDVIKA
  16. //   NORWAY                   
  17. //-----------------------------------------------------------
  18.  
  19. str exit  [20]
  20.    ,global[]="GLOBAL"
  21.    ,read[]="R"                 // To READ from Global script.
  22.    ,write[]="W"                // To WRITE to Global script.
  23.    ;
  24.  
  25. //-----------------------------------------------------------
  26. // Script starts here.
  27. //-----------------------------------------------------------
  28.  
  29. main()
  30. {
  31.   if (!carrier()) 
  32.     exittelix (0,1);
  33.  
  34.   call (global,read,"EXIT",exit);        // Nothing defined?
  35.  
  36.   if (strposi (exit,"YES",0) >= 0)       // EXIT?
  37.     call (global,write,"EXIT","NO");     // Toggle to NO.
  38.   else
  39.     call (global,write,"EXIT","YES");    // Toggle to YES.
  40.  
  41.   call (global,write,"CHANGE","YES");    // Status changed.
  42.   call ("display");
  43.   return (0);
  44. }
  45.  
  46.